package cn.zust.edu.cn;

import java.awt.*;

public class Rectangle implements IShape{
    java.awt.Point ptTopLeft;
    java.awt.Point ptTopRight;
    int width,height;
    private Graphics graphics;

    Rectangle(){

    }

    Rectangle(Point topleft, int hight, int width){

    }

    public double perimeter(){
        return 2*(width + height);
    }

    public double area(){
        return  height * width;
    }

    public void draw(){
         graphics.drawRect(ptTopLeft.x, ptTopLeft.y, width,height);
    }
}
